﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Threading;

namespace LuanVanProject
{
    /// <summary>
    /// Interaction logic for HolderWindow.xaml
    /// </summary>
    public partial class HolderWindow : Window
    {
        public HolderWindow()
        {
            InitializeComponent();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            Thread thread1 = new Thread(new ThreadStart(ShowMain));
            thread1.SetApartmentState(ApartmentState.STA);
            thread1.Start();
            Thread thread2 = new Thread(new ThreadStart(ShowDetail));
            thread2.SetApartmentState(ApartmentState.STA);
            thread2.Start();
            Thread thread3 = new Thread(new ThreadStart(ShowProject));
            thread3.SetApartmentState(ApartmentState.STA);
            thread3.Start();
        }
        [STAThread]
        void ShowMain()
        {
            App.mainWindow = new MainWindow();
            App.mainWindow.ShowDialog();
        }
        [STAThread]
        void ShowDetail()
        {
            App.detailWindows = new DetailWindow();
            App.detailWindows.ShowDialog();
        }
        [STAThread]
        void ShowProject()
        {
            App.projWindow = new ProjectWindow();
            App.projWindow.ShowDialog();
        }
    }
}
